package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.Return;
import com.example.shoppingmall.pojo.Returnmethod;
import com.example.shoppingmall.pojo.Rrturnstatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ReturnMapper {
    //退货单条件查询+分页+点击排序
    public List<Return> getreturns(@Param("reno") String reno,@Param("returnno") String returnno,@Param("rorderno") String rorderno,
                                   @Param("rphone") String rphone,@Param("logisticsno") String logisticsno,
                                   @Param("status") String status,@Param("pageno") Integer pageno,
                                   @Param("pageSize") Integer pageSize);


    //查询总条数
    public int returncount(@Param("returnno") String returnno,@Param("rorderno") String rorderno,
                           @Param("rphone") String rphone,@Param("logisticsno") String logisticsno,
                           @Param("status") String status);


    //退款单列表
    //多条件查询+分页
    public List<Return> getRet(@Param("returnno")String returnno,@Param("username")String username,@Param("rphone")String rphone,@Param("rstatus")Integer rstatus,
                               @Param("pageNo")Integer pageNo,@Param("pageNum")Integer pageNum);

    //查询总条数
    public int total(@Param("returnno")String returnno,@Param("username")String username,@Param("rphone")String rphone,@Param("rstatus")Integer rstatus);

    //修改
    public int update(Return returns);

    //根据id查询详情
    public Return toRet(@Param("id")Integer id);

    //查询退款状态List
    public List<Rrturnstatus> getReSta();

    //查询退款方式List
    public List<Returnmethod> getReMet();
}
